﻿using System;
using System.Collections.Generic;

namespace DelegatesExample
{
    class PhotoProcessor
    {
        
        public void Process(string path, Action<Photo> filters)
        {
            Photo photo = new Photo(path);
            //filters.Invoke(photo);
            filters(photo);

            //PhotoFilters filters = new PhotoFilters();
            //filters.ChangeBrightness(photo);
            //filters.ChangeContrast(photo);
            //filters.ApplyColorScheme(photo);
        }

        public void Process2(string path, List<IPhotoFilter> filters)
        {
            Photo photo = new Photo(path);
            foreach (var filter in filters)
            {
                filter.Apply(photo);
            }
        }

    }

    interface IPhotoFilter
    {
        void Apply(Photo photo);
    }
}